﻿using System;
using Colorful.Furniture.Enum;
using Colorful.Furniture.IEntity;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.ErpSupplierManagement;

/// <summary>
///  供应商日志记录
/// </summary>
[Table(Name = "erp_bba_supplier_log")]
public class SupplierLog : AuditTenantSoftDeleteAggregateRoot
{
    /// <summary>
    ///  编码
    /// </summary>
    [Column(Name = "id")]
    public Guid Id { get; set; }

    /// <summary>
    ///  供应商编码
    /// </summary>
    [Column(Name = "supplier_id")]
    public Guid? SupplierId { get; set; }

    /// <summary>
    /// 变更余额
    /// </summary>
    [Column(Name = "change_price", Scale = 4, Precision = 16)]
    public decimal? ChangePrice { get; set; }

    /// <summary>
    /// 变更前账户余额
    /// </summary>
    [Column(Name = "before_price", Scale = 4, Precision = 16)]
    public decimal? BeforePrice { get; set; }

    /// <summary>
    /// 变更后账户余额
    /// </summary>
    [Column(Name = "after_price", Scale = 4, Precision = 16)]
    public decimal? AfterPrice { get; set; }

    /// <summary>
    /// 变更前授信额度
    /// </summary>
    [Column(Name = "before_credit_price", Scale = 4, Precision = 16)]
    public decimal? BeforeCreditPrice { get; set; }

    /// <summary>
    /// 变更后授信额度
    /// </summary>
    [Column(Name = "after_credit_price", Scale = 4, Precision = 16)]
    public decimal? AfterCreditPrice { get; set; }

    /// <summary>
    ///  操作时间
    /// </summary>
    [Column(Name = "operator_time")]
    public DateTime? OperatorTime { get; set; }

    /// <summary>
    ///  操作人员姓名
    /// </summary>
    [Column(Name = "operator", StringLength = 50)]
    public string Operator { get; set; }

    /// <summary>
    ///  操作类型： 新增 = 1；修改 = 2 ；充值 = 3；扣款 = 4
    /// </summary>
    [Column(Name = "operator_type")]
    public EnumOperatorType? OperatorType { get; set; }

    /// <summary>
    ///  操作人员帐号
    /// </summary>
    [Column(Name = "operator_no", StringLength = 100)]
    public string OperatorNo { get; set; }

    /// <summary>
    ///  日志内容
    /// </summary>
    [Column(Name = "log_content", StringLength = -1)]
    public string LogContent { get; set; }

    /// <summary>
    ///  请求JSON
    /// </summary>
    [Column(Name = "request_json", StringLength = -1)]
    public string RequestJson { get; set; }

    /// <summary>
    /// 下游订单号（平台生成）
    /// </summary>
    [Column(Name = "order_down_no", StringLength = 60)]
    public string OrderDownNo { get; set; }

    /// <summary>
    ///  订单编码
    /// </summary>
    [Column(Name = "customer_order_id")]
    public Guid? CustomerOrderId { get; set; }

}

